package mr.ali.videoapp.portal.mapper;

import mr.ali.videoapp.portal.model.Collection;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Select;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
* <p>
    *  Mapper 接口
    * </p>
*
* @author Mr-ali
* @since 2025-06-01
*/
    @Repository
    public interface CollectionMapper extends BaseMapper<Collection> {
    /**
     * 筛出关联的剧集
     */
    @Select("select id, season from collection where series_id = #{seriesId} order by season asc")
    List<Collection> findAllSeriesId(Integer seriesId);

    }
